package com.sh.mytool.cv.domain;

import javax.persistence.*;
import javax.persistence.Column;
import com.sh.mytool.cv.domain.VideoFile;
import static javax.persistence.CascadeType.ALL;
import static javax.persistence.GenerationType.AUTO;
import com.sh.mytool.cv.domain.VideoImage;

@Entity
@Table(name = "tb_VIDEO")
public class Video {

    @Column(length = 255)
    private String name;

    @OneToOne(cascade = ALL, optional = true, mappedBy = "video")
    private VideoFile videoFile;

    @Id
    @GeneratedValue(strategy = AUTO)
    private Long id;

	@OneToOne(cascade = ALL, optional = true, mappedBy = "video")
	private VideoImage videoImage;

    public void setName(String param) {
        this.name = param;
    }

    public String getName() {
        return name;
    }

    public VideoFile getVideoFile() {
        return videoFile;
    }

    public void setVideoFile(VideoFile param) {
        this.videoFile = param;
    }

    public void setId(Long param) {
        this.id = param;
    }

    public Long getId() {
        return id;
    }

	public VideoImage getVideoImage() {
	    return videoImage;
	}

	public void setVideoImage(VideoImage param) {
	    this.videoImage = param;
	}

}